<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style type="text/css">
        .box {
            width: 100px;
            padding: 100px;
            background-color: skyblue;
        }
    </style>
</head>

<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <h2 v-text="msg">文字位置</h2>
        <input type="button" value="button1" v-on:click="clickHolder">
        <input type="button" value="button2" v-on:click="fn(message)">
        <div class="box" @mouseenter="fn1"></div>
    </div>

    <script src="vue.js"></script>
    <script type="text/javascript">
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'hello Vue!!',
                message:'哈哈哈哈'

            },
            methods: {
                clickHolder: function() {
                    this.msg = 'yeah ,changed'
                },
                fn: function(arg) {
                    this.msg = arg
                },
                fn1:function () {
                    this.msg= '鼠标移入'
                }
            }
        });
    </script>
</body>

</html>